import React, { Component } from 'react';
import Headers from '../components/Header';
import Footers from '../components/Footer';

class Temp extends Component {
  constructor(props) {
    super(props);
    this.state = {
      name: 'comm'
    }
    document.title = this.props.title;
  }
  isFooter() {
    return this.props.isNav && <Footers />
  }
  render() {
    return (
      <div className="Comm">
        <Headers go={this.props.back} titleText={this.props.title} />
        {this.props.children}
        {this.isFooter()}
      </div>
    );
  }
}

export default Temp;
